package com.fowo.api.model.supplier.order;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
import com.fowo.api.common.validator.EnumsString;
import javax.validation.constraints.*;
import lombok.Getter;
import lombok.Setter;

/** 供应商订单 导入导出辅助模型 */
@Getter
@Setter
public class SupplierOrderExcelPo {

  @Size(max = 50, message = "单号长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "单号")
  private String supplierOrder;

  @Size(max = 50, message = "采购单号长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "采购单号")
  private String purchaseOrderCode;

  @Size(max = 50, message = "联系人长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "联系人")
  private String contactPersonName;

  @ExcelIgnore
  @ExcelProperty(value = "联系人")
  private Long contactPerson;

  @Size(max = 50, message = "联系电话长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "联系电话")
  private String contactNumber;

  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "结算方式")
  private String settlementMethod;

  @ExcelProperty(value = "预付比例")
  private java.math.BigDecimal advanceRatio;

  @Size(max = 50, message = "结算描述长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "结算描述")
  private String settlementDescribe;

  @Size(max = 50, message = "支付方式长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "支付方式")
  private String paymentMethod;

  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "采购币种")
  private String purchaseCurrency;

  @ExcelProperty(value = "运费")
  private java.math.BigDecimal shippingPrice;

  @ExcelProperty(value = "其它费用")
  private java.math.BigDecimal otherCurrency;

  @EnumsString(
    value = { "不分摊", "按金额", "按数量" },
    message = "费用分摊方式的可用值为 “不分摊”, “按金额”, “按数量” 其中之一"
  )
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "费用分摊方式")
  private String feePartType;

  @EnumsString(
    value = { "否", "是" },
    message = "含税的可用值为 “否”, “是” 其中之一"
  )
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "含税")
  private String includingTax;

  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "采购员")
  private String optUidName;

  @ExcelIgnore
  @ExcelProperty(value = "采购员")
  private Long optUid;

  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "单据负责人")
  private String oversightUidName;

  @ExcelIgnore
  @ExcelProperty(value = "单据负责人")
  private Long oversightUid;

  @Size(max = 50, message = "备注长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "备注")
  private String remarks;

  @ExcelProperty(value = "总金额")
  private java.math.BigDecimal totalPrice;

  @ExcelProperty(value = "发货量")
  private Integer quantityReceived;

  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "状态")
  private String stauts;

  @DateTimeFormat("yyyy年MM月dd日")
  @ExcelProperty(value = "采购日期")
  private java.util.Date purchasesDate;

  @ExcelProperty(value = "采购数量")
  private Integer purchaseQuantity;

  @EnumsString(
    value = { "作废", "待提交", "待到货", "已完成", "待审批", "驳回" },
    message = "审批状态的可用值为 “作废”, “待提交”, “待到货”, “已完成”, “待审批”, “驳回” 其中之一"
  )
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "审批状态")
  private String anStatus;

  @Size(max = 50, message = "单据备注长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "单据备注")
  private String orderRemarkSear;

  @EnumsString(
    value = { "未到货", "部分到货", "全部到货" },
    message = "发货状态的可用值为 “未到货”, “部分到货”, “全部到货” 其中之一"
  )
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "发货状态")
  private String arrivalStatus;

  @DateTimeFormat("yyyy年MM月dd日HH:mm:ss")
  @ExcelProperty(value = "下单时间")
  private java.util.Date orderTime;

  @EnumsString(
    value = { "未申请", "已申请", "部分付款", "已付款" },
    message = "付款状态的可用值为 “未申请”, “已申请”, “部分付款”, “已付款” 其中之一"
  )
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "付款状态")
  private String payStatus;

  @EnumsString(
    value = { "是", "否" },
    message = "加急的可用值为 “是”, “否” 其中之一"
  )
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "加急")
  private String urgentOrNot;
}
